import http from "./http";

const BASE_URL_PATH = "/rag/knowledgeSet";

export default {
  list(params) {
    return http.post(`${BASE_URL_PATH}/list`, { data: JSON.stringify(params) });
  },
  detail(id) {
    return http.get(`${BASE_URL_PATH}/${id}`);
  },
  create(data) {
    return http.post(`${BASE_URL_PATH}`, { data: JSON.stringify(data) });
  },
  update(id, data) {
    return http.put(`${BASE_URL_PATH}`, { data: JSON.stringify(data) });
  },
};
